<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>计划上报年计划表管理</title>
<meta name="decorator" content="default"/>
<script type="text/javascript">
	$(document).ready(function() {
		
	});
	function page(n,s){
		$("#pageNo").val(n);
		$("#pageSize").val(s);
		$("#searchForm").submit();
       	return false;
       }
</script>
</head>
<body>
<ul class="nav nav-tabs">
	<li class="active"><a href="${ctx}/plan/bsPlanYear/">年度计划列表</a></li>
</ul>
<form:form id="searchForm" modelAttribute="bsPlanYear" action="${ctx}/plan/bsPlanYear/list" method="post" class="breadcrumb form-search">
	<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
	<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
	<ul class="ul-form">
		<li><label>状态：</label>
			<form:select path="planStatus" class="input-medium">
				<form:option value="" label="请选择"/>
				<form:options items="${fns:getDictList('bs_plan_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
			</form:select>
		</li>
		<li><label>填报单位：</label>
			<sys:treeselect2 id="areaCode" name="areaCode" value="${bsPlanYear.areaCode}" labelName="areaName" labelValue="${bsPlanYear.areaName}"
				title="部门" url="/sys/office/treeData?type=2" cssClass="input-small" allowClear="true" notAllowSelectParent="false"/>
		</li>
		<li><label>计划日期：</label>
			<input name="planDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
				value="<fmt:formatDate value="${bsPlanYear.planDate}" pattern="yyyy-MM"/>"
				onclick="WdatePicker({dateFmt:'yyyy-MM',isShowClear:false});"/>
		</li>
		<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
		<li class="clearfix"></li>
	</ul>
</form:form>
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
	<thead>
		<tr>
			<shiro:hasPermission name="plan:bsPlanYear:edit"><th>操作</th></shiro:hasPermission>
			<th>计划</th>
			<th>状态</th>
			<th>填报单位</th>
			<th>填报人</th>
			<th>审核单位</th>
			<th>计划日期</th>
			<th>类型</th>
			<th>备注</th>
			<th>创建日期</th>
		</tr>
	</thead>
	<tbody>
	<c:forEach items="${page.list}" var="bsPlanYear">
		<tr>
			<shiro:hasPermission name="plan:bsPlanYear:edit"><td>
				<c:if test="${bsPlanYear.fromOrgCode == office.code && (bsPlanYear.planStatus == 0 || bsPlanYear.planStatus == 9)}">
				<a href="${ctx}/plan/bsPlanYear/formEdit?id=${bsPlanYear.id}">修改</a>
				<a href="${ctx}/plan/bsPlanYear/delete?id=${bsPlanYear.id}" onclick="return confirmx('确认要删除该计划上报年计划表吗？', this.href)">删除</a>
				</c:if>
				<c:if test="${bsPlanYear.fromOrgCode == office.code && bsPlanYear.planStatus == 2}">
				<shiro:hasPermission name="plan:bsPlanMonth:edit"><li><a href="${ctx}/plan/bsPlanMonth/formAdd?planYearId=${bsPlanYear.id}">月计划填报</a></li></shiro:hasPermission>
				</c:if>
			</td></shiro:hasPermission>
			<td><a href="${ctx}/plan/bsPlanYear/formView?id=${bsPlanYear.id}">
				${bsPlanYear.planTitle}
			</a></td>
			<td>
				${fns:getDictLabel(bsPlanYear.planStatus, "bs_plan_status", bsPlanYear.planStatus)}
			</td>
			<td>
				${bsPlanYear.fromOrgName}
			</td>
			<td>
				${bsPlanYear.planBy}
			</td>
			<td>
				${bsPlanYear.toOrgName}
			</td>
			<td>
				<fmt:formatDate value="${bsPlanYear.planDate}" pattern="yyyy年"/>
			</td>
			<td>
				${fns:getDictLabel(bsPlanYear.type, 'bs_vaccine_type', '')}
			</td>
			<td>
				${bsPlanYear.remarks}
			</td>
			<td>
				<fmt:formatDate value="${bsPlanYear.createDate}" pattern="yyyy-MM-dd"/>
			</td>
		</tr>
	</c:forEach>
	</tbody>
</table>
<div class="pagination">${page}</div>
</body>
</html>